InputPanel for WinForms | ComponentOne
C1.Win.8 Assembly / C1.Win.Drawing Namespace / StringRendererGDI Class / MeasureSubstring Method / MeasureSubstring(Graphics,Font,TextFormatFlags,Rectangle,String,IList<CharacterRange>) Method
The device context.
The Font of text.
The text layout information.
The System.Drawing.Rectangle that represents the bounds of the text.
The text to draw.
Positions and lengths of all occurrences of substrings to highlight.

In This Topic
    MeasureSubstring(Graphics,Font,TextFormatFlags,Rectangle,String,IList<CharacterRange>) Method
    In This Topic
    Gets the bounds for displaying the part of this text.
    Syntax
    'Declaration
     
    Public Overloads Shared Function MeasureSubstring( _
       ByVal graphics As Graphics, _
       ByVal font As Font, _
       ByVal textFormatFlags As TextFormatFlags, _
       ByVal bounds As Rectangle, _
       ByVal text As String, _
       ByVal substringRanges As IList(Of CharacterRange) _
    ) As Rectangle()
    public static Rectangle[] MeasureSubstring( 
       Graphics graphics,
       Font font,
       TextFormatFlags textFormatFlags,
       Rectangle bounds,
       string text,
       IList<CharacterRange> substringRanges
    )

    Parameters

    graphics
    The device context.
    font
    The Font of text.
    textFormatFlags
    The text layout information.
    bounds
    The System.Drawing.Rectangle that represents the bounds of the text.
    text
    The text to draw.
    substringRanges
    Positions and lengths of all occurrences of substrings to highlight.
    See Also